package com.itheima.nursing.controller;

import com.itheima.nursing.Service.ProjectService;
import com.itheima.nursing.domain.PageQuery;
import com.itheima.nursing.domain.Project;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/nursing/project")
public class ProjectController {
    @Autowired
    private ProjectService projectService;
    //分页查询方法
    @GetMapping
    public String PageSearch(PageQuery pageQuery) {
        return "查询所有项目";
    }
    //根据id查询
    @GetMapping("/{id}")
    public String findById(@PathVariable Integer id) {
        return "根据id查询";
    }
    //添加项目方法
    @PostMapping
    public String add(@RequestBody Project project) {
        return "添加项目";
    }
    //修改项目方法
    @PutMapping
    public String update(@RequestBody Project project) {
        return "修改项目";
    }
    //删除项目方法
    @DeleteMapping("/{id}")
    public String delete(@PathVariable Integer id) {
        return "删除项目";
    }
}
